<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<%@ page import="com.colabo.j2ee.web.oaf.menu.action.MenuAction" 
%>
<%
	MenuAction action = new MenuAction();
	String menuJson2 = action.getAllMenusFromPersistence();
%>

<head>
<script type="text/javascript">
	    nodes = <%=menuJson2%>;
	    new MUI.Tree({
	        container:'page',
	        width:180,
	        height:100,
	        id:'tree1',
	        nodes:nodes,
	        textField:'menuName',
	        valueField:'menuCode',
	        onNodeExpanded: function(node,isExpanded,self,e) {
	        	MochaUI.notification('点击菜单' + node.menuCode + ', isExpanded=' + isExpanded);
	        	return false;
	        },
	        onNodeChecked: function(node,checked,self,e) {
	        	MochaUI.notification('点击菜单' + node.menuCode + ', checked=' + checked);
	        	return false;
	        },
	        onNodeSelected: function(node,self,e) {
	        	MochaUI.notification('点击菜单' + node.menuCode);
	        	return false;
	        }
	    });
	

</script>
<link rel="stylesheet" type="text/css" href="resources/plugins/mochaTree/style.css" />

</head>

<body>

<div id="page">
</div>

</body>
</html>
